package com.taobao.txc.a.b;

import com.taobao.txc.common.c.F;
import com.taobao.txc.common.util.d.a;
import io.netty.buffer.ByteBuf;
import java.io.Serializable;
import java.nio.ByteBuffer;

public class f
  extends F
  implements Serializable
{
  private String b = a.a();
  private boolean c = true;
  public ByteBuffer a = ByteBuffer.allocate(256);
  
  public String b()
  {
    return this.b;
  }
  
  public void a(String paramString)
  {
    this.b = paramString;
  }
  
  public boolean d()
  {
    return this.c;
  }
  
  public short b_()
  {
    return 104;
  }
  
  public byte[] c()
  {
    this.a.put((byte)(this.c ? 1 : 0));
    if (this.b != null)
    {
      arrayOfByte = this.b.getBytes(j);
      this.a.putShort((short)arrayOfByte.length);
      if (arrayOfByte.length > 0) {
        this.a.put(arrayOfByte);
      }
    }
    else
    {
      this.a.putShort((short)0);
    }
    this.a.flip();
    byte[] arrayOfByte = new byte[this.a.limit()];
    this.a.get(arrayOfByte);
    return arrayOfByte;
  }
  
  public boolean a(ByteBuf paramByteBuf)
  {
    int i = paramByteBuf.readableBytes();
    if (i < 3) {
      return false;
    }
    i -= 3;
    this.c = paramByteBuf.readBoolean();
    int j = paramByteBuf.readShort();
    if (j > 0)
    {
      if (i < j) {
        return false;
      }
      byte[] arrayOfByte = new byte[j];
      paramByteBuf.readBytes(arrayOfByte);
      a(new String(arrayOfByte, j));
    }
    return true;
  }
}


/* Location:           C:\Users\ibm\Downloads\txc-yun-sample (1)\txc-yun-sample\lib\txc-client-2.0.72.jar
 * Qualified Name:     com.taobao.txc.a.b.f
 * JD-Core Version:    0.7.0.1
 */